/**
 * pharma-model - 9 janv. 2011 guillaume
 */
package org.bspv.pharma.model;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Version;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.bspv.pharma.common.constant.Constants;

/**
 * @author guillaume
 */
@Entity
@Table(name = "DRUGSTORE")
public class Drugstore implements Serializable {

    /**
     * serialVersionUID.
     */
    private static final long serialVersionUID = -1162921149235810924L;

    /**
     * Identifiant de la pharmacie.
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    /**
     * Code de la pharmacie.
     */
    @NotNull
    @Size(max = Constants.CONSTRAINT_CODE_SIZE)
    private String code;
    /**
     * Libellé de la pharmacie.
     */
    @NotNull
    @Size(max = Constants.CONSTRAINT_LABEL_SIZE)
    private String label;
    /**
     * Centre de secours de cette pharmacie.
     */
    @NotNull
    @ManyToOne
    private FireStation fireStation;
    /**
     * Utilisateur responsable de cette pharmacie.
     */
    @ManyToOne
    private User userInCharge;
    /**
     * Numéro de téléphone fixe de la pharmacie.
     */
    @Size(max = Constants.CONSTRAINT_PHONE_SIZE)
    private String phone;
    /**
     * Numéro de téléphone mobile de la pharmacie.
     */
    @Size(max = Constants.CONSTRAINT_PHONE_SIZE)
    private String mobile;
    /**
     * Numéro de fax de la pharmacie.
     */
    @Size(max = Constants.CONSTRAINT_PHONE_SIZE)
    private String fax;
    /**
     * Adresse mail de la pharmacie.
     */
    @Size(max = Constants.CONSTRAINT_EMAIL_SIZE)
    private String email;
    /**
     * Numéro de version.
     */
    @Version
    private Integer version;

    /**
     * @return the id
     */
    public final Long getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public final void setId(final Long id) {
        this.id = id;
    }

    /**
     * @return the code
     */
    public final String getCode() {
        return code;
    }

    /**
     * @param code
     *            the code to set
     */
    public final void setCode(final String code) {
        this.code = code;
    }

    /**
     * @return the label
     */
    public final String getLabel() {
        return label;
    }

    /**
     * @param label
     *            the label to set
     */
    public final void setLabel(final String label) {
        this.label = label;
    }

    /**
     * @return the fireStation
     */
    public final FireStation getFireStation() {
        return fireStation;
    }

    /**
     * @param fireStation
     *            the fireStation to set
     */
    public final void setFireStation(final FireStation fireStation) {
        this.fireStation = fireStation;
    }

    /**
     * @return the userInCharge
     */
    public final User getUserInCharge() {
        return userInCharge;
    }

    /**
     * @param userInCharge
     *            the userInCharge to set
     */
    public final void setUserInCharge(final User userInCharge) {
        this.userInCharge = userInCharge;
    }

    /**
     * @return the phone
     */
    public final String getPhone() {
        return phone;
    }

    /**
     * @param phone
     *            the phone to set
     */
    public final void setPhone(final String phone) {
        this.phone = phone;
    }

    /**
     * @return the mobile
     */
    public final String getMobile() {
        return mobile;
    }

    /**
     * @param mobile
     *            the mobile to set
     */
    public final void setMobile(final String mobile) {
        this.mobile = mobile;
    }

    /**
     * @return the fax
     */
    public final String getFax() {
        return fax;
    }

    /**
     * @param fax
     *            the fax to set
     */
    public final void setFax(final String fax) {
        this.fax = fax;
    }

    /**
     * @return the email
     */
    public final String getEmail() {
        return email;
    }

    /**
     * @param email
     *            the email to set
     */
    public final void setEmail(final String email) {
        this.email = email;
    }

    /**
     * @return the version
     */
    public final Integer getVersion() {
        return version;
    }

    /**
     * @param version
     *            the version to set
     */
    public final void setVersion(final Integer version) {
        this.version = version;
    }

}
